<?php
class FacebookPhoto extends FacebookBase {
    private $_message;
    private $_path;
    private $_url;
    private $_picture;
    private $_source;
    private $_thumbnail;
    private $_from;
    private $_name;
    private $_height;
    private $_width;
    private $_images;
    private $_link;
    private $_icon;
    private $_position;
    private $_comments;
    private $_tags;
    
    public function set_from(FacebookFrom $from) {
        $this->_from= $from;
        return $this;
    }
    
    public function set_name($name) {
        $this->_name = $name;
        return $this;
    }
     
    public function get_name() {
        return $this->_name;
    }
    
    public function set_height($height) {
        $this->_height = $height;
        return $this;
    }
    
    public function get_height() {
        return $this->_height;
    }
     
    public function set_width($width) {
        $this->_width = $width;
        return $this;
    }
    
    public function get_width($width) {
        $this->_width = $width;
        return $this;
    }
     
    public function get_from() {
        return $this->_from;
    }
    
    public function set_id($id) {
        $this->_photo_id = $id;
        return $this;
    }
    
    public function get_id() {
        return $this->_photo_id;
    }
    
    public function set_message($message) {
        $this->_message = $message;
        return $this;
    }
    
    public function get_message() {
        return $this->_message;
    }
    
    public function set_path($path) {
        $this->_path = realpath($path);
        return $this;
    }
    
    public function get_path() {
        return $this->_path;
    }
    
    public function set_url($url) {
        $this->_url = $url;
        return $this;
    }
    
    public function get_url() {
        return $this->_url;
    }
    
    public function set_picture($url) {
        $this->_picture = $url;
        return $this;
    }
    
    public function get_picture() {
        return $this->_picture;
    }
    
    public function set_source($url) {
        $this->_source = $url;
        return $this;
    }
    
    public function get_source() {
        return $this->_source;
    }
    
    public function set_thumbnail($url) {
        $this->_thumbnail = $url;
        return $this;
    }
    
    public function get_thumbnail() {
        return $this->_thumbnail;
    }

    public function add_image(FacebookImage $image) {
        $this->_images[] = $image;
        return $this;
    }
    
    public function get_image($id) {
        if(isset($this->_images[$id])) {
            return $this->_images[$id];
        }
        return null;
    }
    
    public function get_images() {
        return $this->_images;
    }
    
    public function set_link($link) {
        $this->_link = $link;
        return $this;
    }
    
    public function get_link() {
        return $this->_link;
    }
    
    public function set_icon($icon) {
        $this->_icon = $icon;
        return $this;
    }
    
    public function get_icon() {
        return $this->_icon;
    }
    
    public function set_position($position) {
        $this->_position = $position;
        return $this;
    }
    
    public function get_position() {
        return $this->_position;
    }
    
    public function add_comment(FacebookComment $comment) {
        $this->_comments[$comment->id] = $comment;
        return $this;
    }
    
    public function get_comments() {
        return $this->_comments;
    }
    
    public function get_comment($id) {
        if(isset($this->_comments[$id])) { 
            return $this->_comments[$id];
        }
        return null;
    }
    
    public function add_tag(FacebookTag $tag) {
        $this->_tags[] = $tag;
        return $this;
    }
    
    public function get_tag($id) {
        return $this->_tags[$id];
    }
    
    public function get_tags() {
        return $this->tags;
    }
}
